Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for WASM targets #153

Merged

Conversation

thomasantony
Copy link
Contributor

Effects

  • Adds support for building nyx for wasm targets, specifically wasm32-unknown-unknown. This will enable integration of the crate into browser-based projects.
  • The only changes required are some feature flag changes for some dependencies. This shouldn't affect functionality on non-WASM targets.
  • Added an extra check to the CI pipeline to verify that WASM builds are working. If there are features further down the line that doesn't work on WASM, a new feature flag may be required to gate those features out.

serde_yaml = "0.9.21"
whoami = "1.3.0"
either = {version = "1.8.1", features = ["serde"]}
num = "0.4.0"
enum-iterator = "1.4.0"
rstest = "0.17.0"
getrandom = {version = "0.2", features = ["js"]}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What functionality does the getrandom crate add?

Copy link
Contributor Author

@thomasantony thomasantony May 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used by the rand crate (which is a direct dependency of nyx). If we do not specify this feature flag, it cannot be compiled for WASM.

@ChristopherRabotin
Copy link
Member

Hmm, I'm not sure what has happened by suddenly, parquet version 39.0.0 no longer support the Brotli compression. I'm getting the same error on #147 .

on an `Err` value: NYI("The codec type BROTLI(BrotliLevel(10)) is not supported yet")', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/parquet-39.0.0/src/column/writer/mod.rs:228:62

@ChristopherRabotin ChristopherRabotin merged commit 9724045 into nyx-space:master May 24, 2023
19 checks passed
@thomasantony thomasantony deleted the feature/build_for_wasm_target branch May 25, 2023 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants